<{include file="common/header.tpl"}>
<section id="spread_one" class="column">
		<{if index != null }>
			<h4 class="alert_info">位置：<{$index}> </h4>
			<canvas id="canvas" height="200" width="800"></canvas>
		<{else}>
			<h4 class="alert_info"></h4>
		<{/if}>
        <article class="module width_3_quarter">
        <header>
            <form action ='' method = "GET">
                &nbsp;日期 :从<input type="text" value="<{$start_day}>" id="date2" name='start_day'/>
                &nbsp;&nbsp;到<input type="text" value="<{$end_day}>" id="date2" name='end_day'/>
                位置:<input type="text" value="<{$index}>" id="index" name='index'/>
                <input class="effect-update" type='submit' value='查询'>
            </form>
        </header>
		<div class="tab_container">
			<div id="tab1" class="tab_content">
<!-- 				<div class="channel_wrap" style="display:none">
					<span class="dl">
						<input type="checkbox" id="form_channel_one" class="cb"><label for="form_channel_one">渠道一</label>
					</span>
					<span class="dl">
						<input type="checkbox" id="form_channel_five" class="cb"><label for="form_channel_five">渠道五</label>
					</span>
					
					<div class="checkall_wrap">
						<input type="checkbox" class="check_all" id="check_all"><label for="check_all">全选</label>
					</div>
				</div> -->
			<table class="tablesorter" cellspacing="0"> 
			<thead> 
				<tr> 
    				<th>日期</th> 
    				<th>页面名称</th> 
    				<th>位置</th> 
    				<th>列表下载次数</th> 
    				<th>详情下载次数</th> 
				</tr> 
			</thead> 
			<tbody>
				<{foreach from = $downloads item = 'v'}> 
					<tr>
						<td><{$v.date}></td>
						<td><{$v.page}></td>
						<td><{$v.index+1}></td>
						<td><{$v.list_download}></td>
						<td><{$v.detail_download}></td>
					</tr> 
				<{/foreach}>
				 <tr>
                    <td>合计<{$sumdata.counts}>条记录</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><{$sumdata.list_sum}></td>
                    <td><{$sumdata.detail_sum}></td>
                </tr>
			</tbody> 
			</table>
			</div><!-- end of #tab1 -->
		</div><!-- end of .tab_container -->
		</article><!-- end of content manager article -->
		<div class="clear"></div>
	</section>			
	<script>

            var lineChartData = {
                labels : <{$date_list}> ,
                datasets : [
                {
		            fillColor : "rgba(151,187,205,0.5)",
                    strokeColor : "rgba(151,187,205,1)",
                    pointColor : "rgba(151,187,205,1)",
                    pointStrokeColor : "#fff",
		            scaleOverlay : true,
                    data : <{$counts}>,
                },
                ]
            }
            var myLine = new Chart(document.getElementById("canvas").getContext("2d")).Line(lineChartData);

        </script>
<{include file="common/footer.tpl"}>
